home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / octa209s.zip / octave-2.09 / liboctave / CmplxDET.h < prev    next >
C/C++ Source or Header  |  1996-03-03  |  2KB  |  88 lines

  1. /*
  2.  
  3. Copyright (C) 1996 John W. Eaton
  4.  
  5. This file is part of Octave.
  6.  
  7. Octave is free software; you can redistribute it and/or modify it
  8. under the terms of the GNU General Public License as published by the
  9. Free Software Foundation; either version 2, or (at your option) any
  10. later version.
  11.  
  12. Octave is distributed in the hope that it will be useful, but WITHOUT
  13. ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  14. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  15. for more details.
  16.  
  17. You should have received a copy of the GNU General Public License
  18. along with Octave; see the file COPYING.  If not, write to the Free
  19. Software Foundation, 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  20.  
  21. */
  22.  
  23. #if !defined (octave_ComplexDET_h)
  24. #define octave_ComplexDET_h 1
  25.  
  26. #if defined (__GNUG__)
  27. #pragma interface
  28. #endif
  29.  
  30. class ostream;
  31.  
  32. #include "oct-cmplx.h"
  33.  
  34. class
  35. ComplexDET
  36. {
  37. friend class ComplexMatrix;
  38.  
  39. public:
  40.  
  41.   ComplexDET (void) { }
  42.  
  43.   ComplexDET (const ComplexDET& a)
  44.     {
  45.       det[0] = a.det[0];
  46.       det[1] = a.det[1];
  47.     }
  48.  
  49.   ComplexDET& operator = (const ComplexDET& a)
  50.     {
  51.       if (this != &a)
  52.     {
  53.       det[0] = a.det[0];
  54.       det[1] = a.det[1];
  55.     }
  56.       return *this;
  57.     }
  58.  
  59.   int value_will_overflow (void) const;
  60.   int value_will_underflow (void) const;
  61.  
  62.   Complex coefficient (void) const;
  63.  
  64.   int exponent (void) const;
  65.  
  66.   Complex value (void) const;
  67.  
  68.   friend ostream&  operator << (ostream& os, const ComplexDET& a);
  69.  
  70. private:
  71.  
  72.   ComplexDET (const Complex *d)
  73.     {
  74.       det[0] = d[0];
  75.       det[1] = d[1];
  76.     }
  77.  
  78.   Complex det [2];
  79. };
  80.  
  81. #endif
  82.  
  83. /*
  84. ;;; Local Variables: ***
  85. ;;; mode: C++ ***
  86. ;;; End: ***
  87. */
  88.